#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int j = 0;
	scanf("%d", &j);
	
	int i = 0;
	int m = 1;
	int n = 1;
	

	if (j <= 2)
	{
		return 1;
	}
	else
	{
		for (i = 0; i < j-2; i++)
		{int tmp = 0;
		 tmp = n;
		
	     n = m + n;
		 m = tmp;
		 
	    

		}
		printf("%d", n);
	}
	return 0;
}